<script setup lang="ts">
import { reactive } from "vue";

const user = reactive({ name: "张三", age: 18, gender: "男" });
function UpdateUser() {
  user.name = "王五";
  user.age = 20;
  user.gender = "女";
}
</script>

<template>
  <h1>用户信息：</h1>
  <h3>姓名： {{ user.name }}</h3>
  <h3>年龄： {{ user.age }}</h3>
  <h3>性别： {{ user.gender }}</h3>
  <button @click="UpdateUser">点击我更新！</button>
</template>
